@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["ID", 
						"姓名",
						"所属部门",
						"电话号码", 
						"职位"];
		var _colmodel = [{name:"id", index:"id", width:100,hidden:true},
						{name:"name", index:"name", width:100},
						{name:"dept_names", index:"dept_names", width:100,sortable: false},
						{name:"mobile", index:"mobile", width:100},
						{name:"position", index:"position", width:100}
        ];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}

</script>

<div class="row">
    <div class="col-xs-12">
        <div class="row-fluid" style="margin-bottom: 5px;">
            <div class="tabbable">
                <ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
                    <li class="active">
                        <a data-toggle="tab" href="#" onclick="javascript:window.location.href='${basePath}/${code}'" aria-expanded="true">学校通讯录</a>
                    </li>
                    <li >
                        <a data-toggle="tab" href="#" onclick="javascript:window.location.href='${basePath}/${code}/student'" aria-expanded="false">学生通讯录</a>
                    </li>
                    <li >
                        <a data-toggle="tab" href="#" onclick="javascript:window.location.href='${basePath}/${code}/parent'" aria-expanded="false">家长通讯录</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
			@		{name:"姓名", index:"name", type:"text"},
			@		{name:"电话号码", index:"mobile", type:"text"}
			@];
			@ include("/common/_function/_search2.html",{"col":_col}){}
			<!-- 按钮
			<div class="welljq well-sm" id="btns"></div>-->
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	